package com.chen.controller;

import com.chen.commons.Result;
import com.chen.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 在线聊天
 *
 * @author chenchao
 * @date 2022/7/11 9:15
 */

@RestController
@RequestMapping("/chat")
public class ChatController {

    @Autowired
    private UserMapper userMapper;

    @GetMapping("/admin")
    public Result getAllUsers() {
        return Result.success(userMapper.selectList(null));
    }
}
